#include "../include/require.h"
#include <iostream>
using namespace std;
char oneChar(const char *charArray = 0)
{
    static const char *s;
    if (charArray)
    {
        s = charArray;
        return *s;
    }
    else
        require(s, "un-init s");
    if (*s == '\0')
    {
        return 0;
    }
    return *s++;
}

char *a = "abcdefghijklmnopqrstuvwxyz";

class StaticInfunction
{
private:
    int i;
public:
    StaticInfunction(int ii =0):i(ii){};
    ~StaticInfunction(){
        cout <<"X::~x()"<<endl;
    };
};

void f(){
    static StaticInfunction  x1(47);
    static StaticInfunction  x2;
}


int main()
{
    f();
    oneChar(a);
    char c;
    while ((c = oneChar()) != 0)
    {
        cout << c << endl;
    }
}